package com.hc;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;


//此类是SpringBoot项目的启动类
//要纳入spring容器管理的类，则这些类只要放到此类所在的包，以及子包中，并添加@Componet,@Controller,@Service,@Repository注解即可
@SpringBootApplication
//@ComponentScan("com.other")
@MapperScan("com.hc.mapper")  //在启动类中加MapperScan,表示将MyBatis映射接口的实现类纳入Spring容器管理
public class SpringBootDemo1Application {


    public static void main(String[] args) {
        //SpringApplication.run表示启动springBoot项目
        SpringApplication.run(SpringBootDemo1Application.class, args);
    }

}
